package com.jackson.framespringbootnacos.config;

/*
 * Author: JacksonCoder
 * FileName: AppConfig
 * Version: 1.0.0
 * Date: 2025/4/19
 */

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@RefreshScope
@Component
@ConfigurationProperties(prefix = "app")
public class AppConfig {

    @Value("${app.name:}")  // 给默认值，避免 value 为 null
    private String appName;

    @Value("${app.desc:}")
    private String desc;

    public String getAppName(){
        return this.appName;
    }

    public String getDesc(){
        return this.desc;
    }


}
